package com.huawen.cms.app.service;

import com.huawen.cms.app.mapper.BaseMapper;

import java.io.Serializable;
import java.util.List;

public abstract class BaseServiceImpl<T, ID extends Serializable> implements BaseService<T, ID> {

    public abstract BaseMapper getMapper();

    @Override
    public T getById(ID id) {
        return (T) getMapper().getById(id);
    }

    @Override
    public int insert(T t) {
        return getMapper().insert(t);
    }

    @Override
    public void update(T t) {
        getMapper().update(t);
    }

    @Override
    public List<T> getList(T t) {
        return getMapper().getList(t);
    }

}
